package com.ordermeals.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.ordermeals.R;
/***
 * 登陆
 * **/
public class LoginActivity extends Activity {
	Button loginBtn;
	Button exitBtn;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// TODO Put your code here
		 requestWindowFeature(Window.FEATURE_NO_TITLE);
	        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,   
	                WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.login);
		
		exitBtn=(Button)findViewById(R.id.exitBtn);
		
		
		
		exitBtn.setOnClickListener(exitBtnListener);
		
		loginBtn=(Button)findViewById(R.id.loginBtn);
		loginBtn.setOnClickListener(loginBtnListener);//注册监听器
	}
	OnClickListener loginBtnListener=new OnClickListener(){

		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			Log.d("loginBtnListener", "登陆");
			Intent intent=new Intent();
			intent.setClass(LoginActivity.this, MainActivity.class);
			startActivity(intent);
		}		
	};
	OnClickListener exitBtnListener=new OnClickListener(){

		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			finish();
		}
		
	};
}
